#include <QtWidgets>
#include <qwidget.h>

using namespace std;

class macroSwitcher: public QWidget
{
    Q_OBJECT
public:
    explicit macroSwitcher(QWidget* parent);
	void addTab(const QString &name, const bool &editable = false, const QString &default_value = "");
	void setTabValue(const int &index, const QString &value);
	QString getTabName(const int &index) const;
protected:
    virtual QSize minimumSizeHint() const;
    virtual void leaveEvent(QEvent* event);
    virtual void mouseMoveEvent(QMouseEvent* event);
    virtual void mousePressEvent(QMouseEvent* event);
    virtual void paintEvent(QPaintEvent* event);
signals:
  void changeClicked(int);
  void currentTabChanged(int);
private:

private:
	struct tab_t{
		QString name;
		bool editable;
		QString value;
		bool isMouseOver;
		QRectF Rect;
	};
	vector<tab_t*> tabs;
	int activeIndex;
	double WIDTH;
	QRectF change_rect;
  /*  double Min;
    double Max;
	double Step;
	int subSplit;
	int digits;
    double value1;
	double value2;
	double dist_to_value1;
	double dist_to_value2;
	double distance;
    bool IsMouseOverSlider1;
	bool IsMouseOverSlider2;
	bool IsMouseOverSelectedZone;
    bool IsMovingSlider1;
	bool IsMovingSlider2;
	bool IsMovingSelectedZone;
    QRectF Slider1Rect;
	QRectF Slider2Rect;
	QRectF SelectedZoneRect;*/
};